#extension GL_OES_EGL_image_external : require

precision mediump float;
varying vec2 textureCoordinate;
uniform samplerExternalOES s_texture;

void main()
{
    vec4 CameraPreviewColor = texture2D( s_texture, textureCoordinate );
    gl_FragData[0] =  vec4(CameraPreviewColor.xy, 0.0, 1.0);

    vec2 ReverseTexCoord = vec2( 1.0 - textureCoordinate.x,textureCoordinate.y);
    vec4 ReverseColor = texture2D( s_texture, ReverseTexCoord );
    gl_FragData[1] =  ReverseColor;
}